﻿using System.Collections.Generic;
using System.Linq;

namespace M2Server.ScriptSystem
{
    public class TScriptBase
    {
        public TScriptBase()
        {
            InitQuestCondition();
        }

        /// <summary>
        /// 检查脚本字典
        /// </summary>
        internal Dictionary<string, int> ScriptDictionary;

        /// <summary>
        /// 取检测命令对应编号
        /// </summary>
        /// <param name="sCmd"></param>
        /// <returns></returns>
        public int GetQuestConditionIndex(string sCmd)
        {
            var query = from d in ScriptDictionary where d.Key == sCmd select d.Value;
            return query.FirstOrDefault();
        }

        /// <summary>
        /// 初始化脚本索引列表
        /// </summary>
        internal void InitQuestCondition()
        {
            if (null == ScriptDictionary)
            {
                ScriptDictionary = new Dictionary<string, int>();
            }
            ScriptDictionary.Add(ScriptDef.sSC_PARAM1, ScriptDef.nSC_PARAM1);
            ScriptDictionary.Add(ScriptDef.sSC_PARAM2, ScriptDef.nSC_PARAM2);
            ScriptDictionary.Add(ScriptDef.sSC_PARAM3, ScriptDef.nSC_PARAM3);
            ScriptDictionary.Add(ScriptDef.sSC_PARAM4, ScriptDef.nSC_PARAM4);
            ScriptDictionary.Add(ScriptDef.sSC_KILLSLAVE, ScriptDef.nSC_KILLSLAVE);
            ScriptDictionary.Add(ScriptDef.sMONGEN, ScriptDef.nMONGEN);
            ScriptDictionary.Add(ScriptDef.sSC_ADDGUILDMEMBER, ScriptDef.nSC_ADDGUILDMEMBER);
            ScriptDictionary.Add(ScriptDef.sSC_DELGUILDMEMBER, ScriptDef.nSC_DELGUILDMEMBER);
            ScriptDictionary.Add(ScriptDef.sCHALLENGMAPMOVE, ScriptDef.nCHALLENGMAPMOVE);
            ScriptDictionary.Add(ScriptDef.sGETCHALLENGEBAKITEM, ScriptDef.nGETCHALLENGEBAKITEM);
            ScriptDictionary.Add(ScriptDef.sSETOFFTIMER, ScriptDef.nSETOFFTIMER);
            ScriptDictionary.Add(ScriptDef.sAUTOGOTOXY, ScriptDef.nAUTOGOTOXY);
            ScriptDictionary.Add(ScriptDef.sDELNAMELIST, ScriptDef.nDELNAMELIST);
            ScriptDictionary.Add(ScriptDef.sTAKEW, ScriptDef.nTAKEW);
            ScriptDictionary.Add(ScriptDef.sSC_CLEARNAMELIST, ScriptDef.nSC_CLEARNAMELIST);
            ScriptDictionary.Add(ScriptDef.sADDATTACKSABUKALL, ScriptDef.nADDATTACKSABUKALL);
            ScriptDictionary.Add(ScriptDef.sTHROWITEM, ScriptDef.nTHROWITEM);
            ScriptDictionary.Add(ScriptDef.sSetOnTimer, ScriptDef.nSetOnTimer);
            ScriptDictionary.Add(ScriptDef.sMAP, ScriptDef.nMAP);
            ScriptDictionary.Add(ScriptDef.sGOHOME, ScriptDef.nGOHOME);
            ScriptDictionary.Add(ScriptDef.sHCall, ScriptDef.nHCall);
            ScriptDictionary.Add(ScriptDef.sTIMERECALL, ScriptDef.nTIMERECALL);
            ScriptDictionary.Add(ScriptDef.sADDNAMELIST, ScriptDef.nADDNAMELIST);
            ScriptDictionary.Add(ScriptDef.sCLOSE, ScriptDef.nCLOSE);
            ScriptDictionary.Add(ScriptDef.sMOV,ScriptDef.nMOV);
            ScriptDictionary.Add(ScriptDef.sINC, ScriptDef.nINC);
            ScriptDictionary.Add(ScriptDef.sDEC, ScriptDef.nDEC);
            ScriptDictionary.Add(ScriptDef.sSUM, ScriptDef.nSUM);
            ScriptDictionary.Add(ScriptDef.sGOTO, ScriptDef.nGOTO);
            ScriptDictionary.Add(ScriptDef.sBREAK, ScriptDef.nBREAK);
            ScriptDictionary.Add(ScriptDef.sMONCLEAR, ScriptDef.nMONCLEAR);
            ScriptDictionary.Add(ScriptDef.sSC_GIVE, ScriptDef.nSC_GIVE);
            ScriptDictionary.Add(ScriptDef.sTAKE, ScriptDef.nTAKE);
            ScriptDictionary.Add(ScriptDef.sSENDMSG, ScriptDef.nSENDMSG);
            ScriptDictionary.Add(ScriptDef.sMAPMOVE, ScriptDef.nMAPMOVE);
            ScriptDictionary.Add(ScriptDef.sDELACCOUNTLIST, ScriptDef.nDELACCOUNTLIST);
            ScriptDictionary.Add(ScriptDef.sSET, ScriptDef.nSET);
            ScriptDictionary.Add(ScriptDef.sWEBBROWSER, ScriptDef.nWEBBROWSER);
            ScriptDictionary.Add(ScriptDef.sCHECKPKPOINT, ScriptDef.nCHECKPKPOINT);
            ScriptDictionary.Add(ScriptDef.sCHECKGOLD, ScriptDef.nCHECKGOLD);
            ScriptDictionary.Add(ScriptDef.sCHECKLEVEL, ScriptDef.nCHECKLEVEL);
            ScriptDictionary.Add(ScriptDef.sCHECKJOB, ScriptDef.nCHECKJOB);
            ScriptDictionary.Add(ScriptDef.sRANDOM, ScriptDef.nRANDOM);
            ScriptDictionary.Add(ScriptDef.sCHECKITEM, ScriptDef.nCHECKITEM);
            ScriptDictionary.Add(ScriptDef.sGENDER, ScriptDef.nGENDER);
            ScriptDictionary.Add(ScriptDef.sCHECKBAGGAGE, ScriptDef.nCHECKBAGGAGE);
            ScriptDictionary.Add(ScriptDef.sCHECKNAMELIST, ScriptDef.nCHECKNAMELIST);
            ScriptDictionary.Add(ScriptDef.sSC_HASGUILD, ScriptDef.nSC_HASGUILD);
            ScriptDictionary.Add(ScriptDef.sSC_ISGUILDMASTER, ScriptDef.nSC_ISGUILDMASTER);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKCASTLEMASTER, ScriptDef.nSC_CHECKCASTLEMASTER);
            ScriptDictionary.Add(ScriptDef.sSC_ISNEWHUMAN, ScriptDef.nSC_ISNEWHUMAN);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKMEMBERTYPE, ScriptDef.nSC_CHECKMEMBERTYPE);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKMEMBERLEVEL, ScriptDef.nSC_CHECKMEMBERLEVEL);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKGAMEGOLD, ScriptDef.nSC_CHECKGAMEGOLD);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKGAMEPOINT, ScriptDef.nSC_CHECKGAMEPOINT);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKNAMELISTPOSITION, ScriptDef.nSC_CHECKNAMELISTPOSITION);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKGUILDLIST, ScriptDef.nSC_CHECKGUILDLIST);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKRENEWLEVEL, ScriptDef.nSC_CHECKRENEWLEVEL);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKSLAVELEVEL, ScriptDef.nSC_CHECKSLAVELEVEL);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKSLAVENAME, ScriptDef.nSC_CHECKSLAVENAME);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKCREDITPOINT, ScriptDef.nSC_CHECKCREDITPOINT);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKOFGUILD, ScriptDef.nSC_CHECKOFGUILD);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKPAYMENT, ScriptDef.nSC_CHECKPAYMENT);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKUSEITEM, ScriptDef.nSC_CHECKUSEITEM);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKBAGSIZE, ScriptDef.nSC_CHECKBAGSIZE);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKDC, ScriptDef.nSC_CHECKDC);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKMC, ScriptDef.nSC_CHECKMC);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKSC, ScriptDef.nSC_CHECKSC);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKHP, ScriptDef.nSC_CHECKHP);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKMP, ScriptDef.nSC_CHECKMP);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKCODELIST, ScriptDef.nSC_CHECKCODELIST);
            ScriptDictionary.Add(ScriptDef.sCLEARCODELIST, ScriptDef.nCLEARCODELIST);
            ScriptDictionary.Add(ScriptDef.sSC_HEROSKILLLEVEL, ScriptDef.nSC_HEROSKILLLEVEL);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKITEMTYPE, ScriptDef.nSC_CHECKITEMTYPE);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKEXP, ScriptDef.nSC_CHECKEXP);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKCASTLEGOLD, ScriptDef.nSC_CHECKCASTLEGOLD);
            ScriptDictionary.Add(ScriptDef.sSC_PASSWORDERRORCOUNT, ScriptDef.nSC_PASSWORDERRORCOUNT);
            ScriptDictionary.Add(ScriptDef.sSC_ISLOCKPASSWORD, ScriptDef.nSC_ISLOCKPASSWORD);
            ScriptDictionary.Add(ScriptDef.sSC_ISLOCKSTORAGE, ScriptDef.nSC_ISLOCKSTORAGE);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKBUILDPOINT, ScriptDef.nSC_CHECKBUILDPOINT);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKAURAEPOINT, ScriptDef.nSC_CHECKAURAEPOINT);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKSTABILITYPOINT, ScriptDef.nSC_CHECKSTABILITYPOINT);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKFLOURISHPOINT, ScriptDef.nSC_CHECKFLOURISHPOINT);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKCONTRIBUTION, ScriptDef.nSC_CHECKCONTRIBUTION);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKRANGEMONCOUNT, ScriptDef.nSC_CHECKRANGEMONCOUNT);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKITEMADDVALUE, ScriptDef.nSC_CHECKITEMADDVALUE);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKINMAPRANGE, ScriptDef.nSC_CHECKINMAPRANGE);
            ScriptDictionary.Add(ScriptDef.sSC_CASTLECHANGEDAY, ScriptDef.nSC_CASTLECHANGEDAY);
            ScriptDictionary.Add(ScriptDef.sSC_CASTLEWARDAY, ScriptDef.nSC_CASTLEWARDAY);
            ScriptDictionary.Add(ScriptDef.sSC_ONLINELONGMIN, ScriptDef.nSC_ONLINELONGMIN);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKGUILDCHIEFITEMCOUNT, ScriptDef.nSC_CHECKGUILDCHIEFITEMCOUNT);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKNAMEDATELIST, ScriptDef.nSC_CHECKNAMEDATELIST);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKMAPHUMANCOUNT, ScriptDef.nSC_CHECKMAPHUMANCOUNT);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKMAPMONCOUNT, ScriptDef.nSC_CHECKMAPMONCOUNT);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKVAR, ScriptDef.nSC_CHECKVAR);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKSERVERNAME, ScriptDef.nSC_CHECKSERVERNAME);
            ScriptDictionary.Add(ScriptDef.sCHECKMAPNAME, ScriptDef.nCHECKMAPNAME);
            ScriptDictionary.Add(ScriptDef.sINSAFEZONE, ScriptDef.nINSAFEZONE);
            ScriptDictionary.Add(ScriptDef.sCHECKSKILL, ScriptDef.nCHECKSKILL);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKUSERDATE, ScriptDef.nSC_CHECKUSERDATE);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKCONTAINSTEXT, ScriptDef.nSC_CHECKCONTAINSTEXT);
            ScriptDictionary.Add(ScriptDef.sSC_COMPARETEXT, ScriptDef.nSC_COMPARETEXT);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKTEXTLIST, ScriptDef.nSC_CHECKTEXTLIST);
            ScriptDictionary.Add(ScriptDef.sSC_ISGROUPMASTER, ScriptDef.nSC_ISGROUPMASTER);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKCONTAINSTEXTLIST, ScriptDef.nSC_CHECKCONTAINSTEXTLIST);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKONLINE, ScriptDef.nSC_CHECKONLINE);
            ScriptDictionary.Add(ScriptDef.sOPENDRAGONBOX, ScriptDef.nOPENDRAGONBOX);
            ScriptDictionary.Add(ScriptDef.sSC_ISDUPMODE, ScriptDef.nSC_ISDUPMODE);
            ScriptDictionary.Add(ScriptDef.sSC_ISOFFLINEMODE, ScriptDef.nSC_ISOFFLINEMODE);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKSTATIONTIME, ScriptDef.nSC_CHECKSTATIONTIME);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKSIGNMAP, ScriptDef.nSC_CHECKSIGNMAP);
            ScriptDictionary.Add(ScriptDef.sSC_HAVEHERO, ScriptDef.nSC_HAVEHERO);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKHEROONLINE, ScriptDef.nSC_CHECKHEROONLINE);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKHEROLEVEL, ScriptDef.nSC_CHECKHEROLEVEL);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKHEROJOB, ScriptDef.nSC_CHECKHEROJOB);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKMINE, ScriptDef.nSC_CHECKMINE);
            ScriptDictionary.Add(ScriptDef.sSC_GIVEMINE, ScriptDef.nSC_GIVEMINE);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKCURRENTDATE, ScriptDef.nSC_CHECKCURRENTDATE);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKMASTERONLINE, ScriptDef.nSC_CHECKMASTERONLINE);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKDEARONLINE, ScriptDef.nSC_CHECKDEARONLINE);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKMASTERONMAP, ScriptDef.nSC_CHECKMASTERONMAP);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKDEARONMAP, ScriptDef.nSC_CHECKDEARONMAP);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKPOSEISPRENTICE, ScriptDef.nSC_CHECKPOSEISPRENTICE);
            ScriptDictionary.Add(ScriptDef.sSENDTOPMSG, ScriptDef.nSENDTOPMSG);
            ScriptDictionary.Add(ScriptDef.sSENDCENTERMSG, ScriptDef.nSENDCENTERMSG);
            ScriptDictionary.Add(ScriptDef.sSENDEDITTOPMSG, ScriptDef.nSENDEDITTOPMSG);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKHEROLOYAL, ScriptDef.nSC_CHECKHEROLOYAL);
            ScriptDictionary.Add(ScriptDef.sSC_CHANGEHEROLOYAL, ScriptDef.nSC_CHANGEHEROLOYAL);
            ScriptDictionary.Add(ScriptDef.sOPENBOOK, ScriptDef.nOPENBOOKS);
            ScriptDictionary.Add(ScriptDef.sOPENBOOKS, ScriptDef.nOPENBOOKS);
            ScriptDictionary.Add(ScriptDef.sSC_RECALLMOBEX, ScriptDef.nSC_RECALLMOBEX);
            ScriptDictionary.Add(ScriptDef.sSC_MOVEMOBTO, ScriptDef.nSC_MOVEMOBTO);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKRANGEMONCOUNTEX, ScriptDef.nSC_CHECKMAPMOBCOUNT);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKMAPMOBCOUNT, ScriptDef.nSC_CHECKMAPMOBCOUNT);
            ScriptDictionary.Add(ScriptDef.sSC_FINDMAPPATH, ScriptDef.nSC_FINDMAPPATH);
            ScriptDictionary.Add(ScriptDef.sREADRANDOMSTR, ScriptDef.nGETRANDOMNAME);
            ScriptDictionary.Add(ScriptDef.sGETRANDOMNAME, ScriptDef.nGETRANDOMNAME);
            ScriptDictionary.Add(ScriptDef.sSC_DIV, ScriptDef.nSC_DIV);
            ScriptDictionary.Add(ScriptDef.sSC_MUL, ScriptDef.nSC_MUL);
            ScriptDictionary.Add(ScriptDef.sSC_PERCENT, ScriptDef.nSC_PERCENT);
            ScriptDictionary.Add(ScriptDef.sTHROUGHHUM, ScriptDef.nTHROUGHHUM);
            ScriptDictionary.Add(ScriptDef.sSETITEMSLIGHT, ScriptDef.nSETITEMSLIGHT);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKHEROPKPOINT, ScriptDef.nSC_CHECKHEROPKPOINT);
            ScriptDictionary.Add(ScriptDef.sGIVESTATEITEM, ScriptDef.nGIVESTATEITEM);
            ScriptDictionary.Add(ScriptDef.sSETITEMSTATE, ScriptDef.nSETITEMSTATE);
            ScriptDictionary.Add(ScriptDef.sCHECKITEMSTATE, ScriptDef.nCHECKITEMSTATE);
            ScriptDictionary.Add(ScriptDef.sISHIGH, ScriptDef.nISHIGH);
            ScriptDictionary.Add(ScriptDef.sOPENYBDEAL, ScriptDef.nOPENYBDEAL);
            ScriptDictionary.Add(ScriptDef.sQUERYYBSELL, ScriptDef.nQUERYYBSELL);
            ScriptDictionary.Add(ScriptDef.sQUERYYBDEAL, ScriptDef.nQUERYYBDEAL);
            ScriptDictionary.Add(ScriptDef.sSC_GMEXECUTE, ScriptDef.nSC_GMEXECUTE);
            ScriptDictionary.Add(ScriptDef.sSC_GUILDCHIEFITEMCOUNT, ScriptDef.nSC_GUILDCHIEFITEMCOUNT);
            ScriptDictionary.Add(ScriptDef.sSC_GAMEDIAMOND, ScriptDef.nSC_GAMEDIAMOND);
            ScriptDictionary.Add(ScriptDef.sSC_GAMEGIRD, ScriptDef.nSC_GAMEGIRD);
            ScriptDictionary.Add(ScriptDef.sSC_MOBFIREBURN, ScriptDef.nSC_MOBFIREBURN);
            ScriptDictionary.Add(ScriptDef.sSC_MESSAGEBOX, ScriptDef.nSC_MESSAGEBOX);
            ScriptDictionary.Add(ScriptDef.sSC_SETSCRIPTFLAG, ScriptDef.nSC_SETSCRIPTFLAG);
            ScriptDictionary.Add(ScriptDef.sSC_SETAUTOGETEXP, ScriptDef.nSC_SETAUTOGETEXP);
            ScriptDictionary.Add(ScriptDef.sSC_CHANGEHEROEXP, ScriptDef.nSC_CHANGEHEROEXP);
            ScriptDictionary.Add(ScriptDef.sSC_VAR, ScriptDef.nSC_VAR);
            ScriptDictionary.Add(ScriptDef.sSC_LOADVAR, ScriptDef.nSC_LOADVAR);
            ScriptDictionary.Add(ScriptDef.sSC_SAVEVAR, ScriptDef.nSC_SAVEVAR);
            ScriptDictionary.Add(ScriptDef.sSC_CALCVAR, ScriptDef.nSC_CALCVAR);
            ScriptDictionary.Add(ScriptDef.sOFFLINEPLAY, ScriptDef.nOFFLINEPLAY);
            ScriptDictionary.Add(ScriptDef.sKICKOFFLINE, ScriptDef.nKICKOFFLINE);
            ScriptDictionary.Add(ScriptDef.sSTARTTAKEGOLD, ScriptDef.nSTARTTAKEGOLD);
            ScriptDictionary.Add(ScriptDef.sDELAYGOTO, ScriptDef.nDELAYGOTO);
            ScriptDictionary.Add(ScriptDef.sDELAYCALL, ScriptDef.nDELAYGOTO);
            ScriptDictionary.Add(ScriptDef.sCLEARDELAYGOTO, ScriptDef.nCLEARDELAYGOTO);
            ScriptDictionary.Add(ScriptDef.sSC_CHANGEHEROPKPOINT, ScriptDef.nSC_CHANGEHEROPKPOINT);
            ScriptDictionary.Add(ScriptDef.sSC_ADDUSERDATE, ScriptDef.nSC_ADDUSERDATE);
            ScriptDictionary.Add(ScriptDef.sSC_DELUSERDATE, ScriptDef.nSC_DELUSERDATE);
            ScriptDictionary.Add(ScriptDef.sSC_ANSIREPLACETEXT, ScriptDef.nSC_ANSIREPLACETEXT);
            ScriptDictionary.Add(ScriptDef.sSC_ENCODETEXT, ScriptDef.nSC_ENCODETEXT);
            ScriptDictionary.Add(ScriptDef.sSC_GAMEGLORY, ScriptDef.nSC_GAMEGLORY);
            ScriptDictionary.Add(ScriptDef.sSC_ADDTEXTLIST, ScriptDef.nSC_ADDTEXTLIST);
            ScriptDictionary.Add(ScriptDef.sSC_DELTEXTLIST, ScriptDef.nSC_DELTEXTLIST);
            ScriptDictionary.Add(ScriptDef.sSC_GROUPMAPMOVE, ScriptDef.nSC_GROUPMAPMOVE);
            ScriptDictionary.Add(ScriptDef.sSC_RECALLHUMAN, ScriptDef.nSC_RECALLHUMAN);
            ScriptDictionary.Add(ScriptDef.sSC_REGOTO, ScriptDef.nSC_REGOTO);
            ScriptDictionary.Add(ScriptDef.sSC_INTTOSTR, ScriptDef.nSC_INTTOSTR);
            ScriptDictionary.Add(ScriptDef.sSC_STRTOINT, ScriptDef.nSC_STRTOINT);
            ScriptDictionary.Add(ScriptDef.sSC_GUILDMOVE, ScriptDef.nSC_GUILDMOVE);
            ScriptDictionary.Add(ScriptDef.sSC_GUILDMAPMOVE, ScriptDef.nSC_GUILDMAPMOVE);
            ScriptDictionary.Add(ScriptDef.sSC_RANDOMMOVE, ScriptDef.nSC_RANDOMMOVE);
            ScriptDictionary.Add(ScriptDef.sSC_BONUSABIL, ScriptDef.nSC_USEBONUSPOINT);
            ScriptDictionary.Add(ScriptDef.sSC_USEBONUSPOINT, ScriptDef.nSC_USEBONUSPOINT);
            ScriptDictionary.Add(ScriptDef.sSC_TAKEONITEM, ScriptDef.nSC_TAKEONITEM);
            ScriptDictionary.Add(ScriptDef.sSC_TAKEOFFITEM, ScriptDef.nSC_TAKEOFFITEM);
            ScriptDictionary.Add(ScriptDef.sSC_CREATEHERO, ScriptDef.nSC_CREATEHERO);
            ScriptDictionary.Add(ScriptDef.sSC_DELETEHERO, ScriptDef.nSC_DELETEHERO);
            ScriptDictionary.Add(ScriptDef.sSC_CHANGEHEROLEVEL, ScriptDef.nSC_CHANGEHEROLEVEL);
            ScriptDictionary.Add(ScriptDef.sSC_CHANGEHEROJOB, ScriptDef.nSC_CHANGEHEROJOB);
            ScriptDictionary.Add(ScriptDef.sSC_CLEARHEROSKILL, ScriptDef.nSC_CLEARHEROSKILL);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKGAMEDIAMOND, ScriptDef.nSC_CHECKGAMEDIAMOND);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKGAMEGIRD, ScriptDef.nSC_CHECKGAMEGIRD);
            ScriptDictionary.Add(ScriptDef.sSC_SETRANKLEVELNAME, ScriptDef.nSC_SETRANKLEVELNAME);
            ScriptDictionary.Add(ScriptDef.sSC_CHANGELEVEL, ScriptDef.nSC_CHANGELEVEL);
            ScriptDictionary.Add(ScriptDef.sSC_MARRY, ScriptDef.nSC_MARRY);
            ScriptDictionary.Add(ScriptDef.sSC_UNMARRY, ScriptDef.nSC_UNMARRY);
            ScriptDictionary.Add(ScriptDef.sSC_GETMARRY, ScriptDef.nSC_GETMARRY);
            ScriptDictionary.Add(ScriptDef.sSC_GETMASTER, ScriptDef.nSC_GETMASTER);
            ScriptDictionary.Add(ScriptDef.sSC_CLEARSKILL, ScriptDef.nSC_CLEARSKILL);
            ScriptDictionary.Add(ScriptDef.sSC_DELNOJOBSKILL, ScriptDef.nSC_DELNOJOBSKILL);
            ScriptDictionary.Add(ScriptDef.sSC_DELSKILL, ScriptDef.nSC_DELSKILL);
            ScriptDictionary.Add(ScriptDef.sSC_ADDSKILL, ScriptDef.nSC_ADDSKILL);
            ScriptDictionary.Add(ScriptDef.sSC_SKILLLEVEL, ScriptDef.nSC_SKILLLEVEL);
            ScriptDictionary.Add(ScriptDef.sSC_CHANGEPKPOINT, ScriptDef.nSC_CHANGEPKPOINT);
            ScriptDictionary.Add(ScriptDef.sSC_CHANGEEXP, ScriptDef.nSC_CHANGEEXP);
            ScriptDictionary.Add(ScriptDef.sSC_CHANGEJOB, ScriptDef.nSC_CHANGEJOB);
            ScriptDictionary.Add(ScriptDef.sSC_MISSION, ScriptDef.nSC_MISSION);
            ScriptDictionary.Add(ScriptDef.sSC_MOBPLACE, ScriptDef.nSC_MOBPLACE);
            ScriptDictionary.Add(ScriptDef.sSC_SETMEMBERTYPE, ScriptDef.nSC_SETMEMBERTYPE);
            ScriptDictionary.Add(ScriptDef.sSC_SETMEMBERLEVEL, ScriptDef.nSC_SETMEMBERLEVEL);
            ScriptDictionary.Add(ScriptDef.sSC_GAMEGOLD, ScriptDef.nSC_GAMEGOLD);
            ScriptDictionary.Add(ScriptDef.sSC_AUTOADDGAMEGOLD, ScriptDef.nSC_AUTOADDGAMEGOLD);
            ScriptDictionary.Add(ScriptDef.sSC_AUTOSUBGAMEGOLD, ScriptDef.nSC_AUTOSUBGAMEGOLD);
            ScriptDictionary.Add(ScriptDef.sSC_CHANGENAMECOLOR, ScriptDef.nSC_CHANGENAMECOLOR);
            ScriptDictionary.Add(ScriptDef.sSC_CLEARPASSWORD, ScriptDef.nSC_CLEARPASSWORD);
            ScriptDictionary.Add(ScriptDef.sSC_RENEWLEVEL, ScriptDef.nSC_RENEWLEVEL);
            ScriptDictionary.Add(ScriptDef.sSC_KILLMONEXPRATE, ScriptDef.nSC_KILLMONEXPRATE);
            ScriptDictionary.Add(ScriptDef.sSC_POWERRATE, ScriptDef.nSC_POWERRATE);
            ScriptDictionary.Add(ScriptDef.sSC_CHANGEMODE, ScriptDef.nSC_CHANGEMODE);
            ScriptDictionary.Add(ScriptDef.sSC_CHANGEPERMISSION, ScriptDef.nSC_CHANGEPERMISSION);
            ScriptDictionary.Add(ScriptDef.sSC_KILL, ScriptDef.nSC_KILL);
            ScriptDictionary.Add(ScriptDef.sSC_KICK, ScriptDef.nSC_KICK);
            ScriptDictionary.Add(ScriptDef.sSC_BONUSPOINT, ScriptDef.nSC_BONUSPOINT);
            ScriptDictionary.Add(ScriptDef.sSC_RESTRENEWLEVEL, ScriptDef.nSC_RESTRENEWLEVEL);
            ScriptDictionary.Add(ScriptDef.sSC_DELMARRY, ScriptDef.nSC_DELMARRY);
            ScriptDictionary.Add(ScriptDef.sSC_DELMASTER, ScriptDef.nSC_DELMASTER);
            ScriptDictionary.Add(ScriptDef.sSC_MASTER, ScriptDef.nSC_MASTER);
            ScriptDictionary.Add(ScriptDef.sSC_UNMASTER, ScriptDef.nSC_UNMASTER);
            ScriptDictionary.Add(ScriptDef.sSC_CREDITPOINT, ScriptDef.nSC_CREDITPOINT);
            ScriptDictionary.Add(ScriptDef.sSC_CLEARNEEDITEMS, ScriptDef.nSC_CLEARNEEDITEMS);
            ScriptDictionary.Add(ScriptDef.sSC_CLEARMAKEITEMS, ScriptDef.nSC_CLEARMAEKITEMS);
            ScriptDictionary.Add(ScriptDef.sSC_SETSENDMSGFLAG, ScriptDef.nSC_SETSENDMSGFLAG);
            ScriptDictionary.Add(ScriptDef.sSC_UPGRADEITEMS, ScriptDef.nSC_UPGRADEITEMS);
            ScriptDictionary.Add(ScriptDef.sSC_UPGRADEITEMSEX, ScriptDef.nSC_UPGRADEITEMSEX);
            ScriptDictionary.Add(ScriptDef.sSC_MONGENEX, ScriptDef.nSC_MONGENEX);
            ScriptDictionary.Add(ScriptDef.sSC_CLEARMAPMON, ScriptDef.nSC_CLEARMAPMON);
            ScriptDictionary.Add(ScriptDef.sSC_SETMAPMODE, ScriptDef.nSC_SETMAPMODE);
            ScriptDictionary.Add(ScriptDef.sSC_GAMEPOINT, ScriptDef.nSC_GAMEPOINT);
            ScriptDictionary.Add(ScriptDef.sSC_PKZONE, ScriptDef.nSC_PKZONE);
            ScriptDictionary.Add(ScriptDef.sSC_RESTBONUSPOINT, ScriptDef.nSC_RESTBONUSPOINT);
            ScriptDictionary.Add(ScriptDef.sSC_TAKECASTLEGOLD, ScriptDef.nSC_TAKECASTLEGOLD);
            ScriptDictionary.Add(ScriptDef.sSC_HUMANHP, ScriptDef.nSC_HUMANHP);
            ScriptDictionary.Add(ScriptDef.sSC_HUMANMP, ScriptDef.nSC_HUMANMP);
            ScriptDictionary.Add(ScriptDef.sSC_BUILDPOINT, ScriptDef.nSC_BUILDPOINT);
            ScriptDictionary.Add(ScriptDef.sSC_AURAEPOINT, ScriptDef.nSC_AURAEPOINT);
            ScriptDictionary.Add(ScriptDef.sSC_STABILITYPOINT, ScriptDef.nSC_STABILITYPOINT);
            ScriptDictionary.Add(ScriptDef.sSC_FLOURISHPOINT, ScriptDef.nSC_FLOURISHPOINT);
            ScriptDictionary.Add(ScriptDef.sSC_OPENBOX, ScriptDef.nSC_OPENMAGICBOX);
            ScriptDictionary.Add(ScriptDef.sSC_OPENMAGICBOX, ScriptDef.nSC_OPENMAGICBOX);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKMAKEWINE, ScriptDef.nSC_CHECKMAKEWINE);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKONLINEPLAYCOUNT, ScriptDef.nSC_CHECKONLINEPLAYCOUNT);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKPLAYDIELVL, ScriptDef.nSC_CHECKPLAYDIELVL);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKPLAYDIEJOB, ScriptDef.nSC_CHECKPLAYDIEJOB);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKPLAYDIESEX, ScriptDef.nSC_CHECKPLAYDIESEX);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKKILLPLAYLVL, ScriptDef.nSC_CHECKKILLPLAYLVL);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKKILLPLAYJOB, ScriptDef.nSC_CHECKKILLPLAYJOB);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKKILLPLAYSEX, ScriptDef.nSC_CHECKKILLPLAYSEX);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKITEMLEVEL, ScriptDef.nSC_CHECKITEMLEVEL);
            ScriptDictionary.Add(ScriptDef.sCHECKITEMSNAME, ScriptDef.nCHECKITEMSNAME);
            ScriptDictionary.Add(ScriptDef.sKILLBYHUM, ScriptDef.nKILLBYHUM);
            ScriptDictionary.Add(ScriptDef.sREADSKILLNG, ScriptDef.nREADSKILLNG);
            ScriptDictionary.Add(ScriptDef.sSC_CHANGENGEXP, ScriptDef.nSC_CHANGENGEXP);
            ScriptDictionary.Add(ScriptDef.sSC_CHANGREADNG, ScriptDef.nSC_CHANGREADNG);
            ScriptDictionary.Add(ScriptDef.sSC_CHANGENGLEVEL, ScriptDef.nSC_CHANGENGLEVEL);
            ScriptDictionary.Add(ScriptDef.sSC_CHANGEGUILDFOUNTAIN, ScriptDef.nSC_CHANGEGUILDFOUNTAIN);
            ScriptDictionary.Add(ScriptDef.sCHECKGUILDFOUNTAINVALUE, ScriptDef.nCHECKGUILDFOUNTAINVALUE);
            ScriptDictionary.Add(ScriptDef.sSC_TAGMAPINFO, ScriptDef.nSC_TAGMAPINFO);
            ScriptDictionary.Add(ScriptDef.sSC_TAGMAPMOVE, ScriptDef.nSC_TAGMAPMOVE);
            ScriptDictionary.Add(ScriptDef.sCHECKNGLEVEL, ScriptDef.nCHECKNGLEVEL);
            ScriptDictionary.Add(ScriptDef.sCREATEFILE, ScriptDef.nCREATEFILE);
            ScriptDictionary.Add(ScriptDef.sSC_SENDMSGWINDOWS, ScriptDef.nSC_SENDMSGWINDOWS);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKSTRINGLENGTH, ScriptDef.nSC_CHECKSTRINGLENGTH);
            ScriptDictionary.Add(ScriptDef.sCHECKGUILDMEMBERCOUNT, ScriptDef.nCHECKGUILDMEMBERCOUNT);
            ScriptDictionary.Add(ScriptDef.sSC_CHANGEGUILDMEMBERCOUNT, ScriptDef.nSC_CHANGEGUILDMEMBERCOUNT);
            ScriptDictionary.Add(ScriptDef.sSC_SENDTIMEMSG, ScriptDef.nSC_SENDTIMEMSG);
            ScriptDictionary.Add(ScriptDef.sSC_GETGROUPCOUNT, ScriptDef.nSC_GETGROUPCOUNT);
            ScriptDictionary.Add(ScriptDef.sSC_CLOSEMSGWINDOWS, ScriptDef.nSC_CLOSEMSGWINDOWS);
            ScriptDictionary.Add(ScriptDef.sSC_OPENEXPCRYSTAL, ScriptDef.nSC_OPENEXPCRYSTAL);
            ScriptDictionary.Add(ScriptDef.sSC_CLOSEEXPCRYSTAL, ScriptDef.nSC_CLOSEEXPCRYSTAL);
            ScriptDictionary.Add(ScriptDef.sSC_GETEXPTOCRYSTAL, ScriptDef.nSC_GETEXPTOCRYSTAL);
            ScriptDictionary.Add(ScriptDef.sSC_OPENMAKEKIMNEEDLE, ScriptDef.nSC_OPENMAKEKIMNEEDLE);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKKIMNEEDLE, ScriptDef.nSC_CHECKKIMNEEDLE);
            ScriptDictionary.Add(ScriptDef.sSC_TAKEKIMNEEDLE, ScriptDef.nSC_TAKEKIMNEEDLE);
            ScriptDictionary.Add(ScriptDef.sSC_GIVEKIMNEEDLE, ScriptDef.nSC_GIVEKIMNEEDLE);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKHUMANPULSE, ScriptDef.nSC_CHECKHUMANPULSE);
            ScriptDictionary.Add(ScriptDef.sSC_OPENPULSE, ScriptDef.nSC_OPENPULSE);
            ScriptDictionary.Add(ScriptDef.sSC_CHANGEPULSELEVEL, ScriptDef.nSC_CHANGEPULSELEVEL);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKPULSELEVEL, ScriptDef.nSC_CHECKPULSELEVEL);
            ScriptDictionary.Add(ScriptDef.sSC_CHANGHEARMSGCOLOR, ScriptDef.nSC_CHANGHEARMSGCOLOR);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKHEARMSGCOLOR, ScriptDef.nSC_CHECKHEARMSGCOLOR);
            ScriptDictionary.Add(ScriptDef.sSC_OPENHEROPULS, ScriptDef.nSC_OPENHEROPULS);
            ScriptDictionary.Add(ScriptDef.sSC_CHANGEHEROPULSEXP, ScriptDef.nSC_CHANGEHEROPULSEXP);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKHEROOPENOPULS, ScriptDef.nSC_CHECKHEROOPENOPULS);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKHEROPULSEXP, ScriptDef.nSC_CHECKHEROPULSEXP);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKITMECOUNTDURA, ScriptDef.nSC_CHECKITMECOUNTDURA);
            ScriptDictionary.Add(ScriptDef.sSC_TAKEITMECOUNTDURA, ScriptDef.nSC_TAKEITMECOUNTDURA);
            ScriptDictionary.Add(ScriptDef.sSC_OPENCATTLEGAS, ScriptDef.nSC_OPENCATTLEGAS);
            ScriptDictionary.Add(ScriptDef.sSC_CLOSECATTLEGAS, ScriptDef.nSC_CLOSECATTLEGAS);
            ScriptDictionary.Add(ScriptDef.sSC_CHANGECATTLEGASEXP, ScriptDef.nSC_CHANGECATTLEGASEXP);
            ScriptDictionary.Add(ScriptDef.sSC_ASSESSMENTHERO, ScriptDef.nSC_ASSESSMENTHERO);
            ScriptDictionary.Add(ScriptDef.sSC_CheckAssessMentHero, ScriptDef.nSC_CheckAssessMentHero);
            ScriptDictionary.Add(ScriptDef.sSC_CheckDeputyHero, ScriptDef.nSC_CheckDeputyHero);
            ScriptDictionary.Add(ScriptDef.sSC_CheckHeroAutoPractice, ScriptDef.nSC_CheckHeroAutoPractice);
            ScriptDictionary.Add(ScriptDef.sSC_OpenHeroAutoPractice, ScriptDef.nSC_OpenHeroAutoPractice);
            ScriptDictionary.Add(ScriptDef.sSC_StopHeroAutoPractice, ScriptDef.nSC_StopHeroAutoPractice);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKSKILL75, ScriptDef.nSC_CHECKSKILL75);
            ScriptDictionary.Add(ScriptDef.sSC_CHANGETRANPOINT, ScriptDef.nSC_CHANGETRANPOINT);
            ScriptDictionary.Add(ScriptDef.sSC_NPCGIVEITEM, ScriptDef.nSC_NPCGIVEITEM);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKHUMINRANGE, ScriptDef.nSC_CHECKHUMINRANGE);
            ScriptDictionary.Add(ScriptDef.sSC_MAPHUMISSAMEGUILD, ScriptDef.nSC_MAPHUMISSAMEGUILD);
            ScriptDictionary.Add(ScriptDef.sCHECKACCOUNTLIST, ScriptDef.nCHECKACCOUNTLIST);
            ScriptDictionary.Add(ScriptDef.sEQUAL, ScriptDef.nEQUAL);
            ScriptDictionary.Add(ScriptDef.sLARGE, ScriptDef.nLARGE);
            ScriptDictionary.Add(ScriptDef.sSMALL, ScriptDef.nSMALL);
            ScriptDictionary.Add(ScriptDef.sCHECKHUM, ScriptDef.nCHECKHUM);
            ScriptDictionary.Add(ScriptDef.sSC_ISONMAP, ScriptDef.nSC_ISONMAP);
            ScriptDictionary.Add(ScriptDef.sCHECKMONMAP, ScriptDef.nCHECKMONMAP);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKLEVELEX, ScriptDef.nSC_CHECKLEVELEX);
            ScriptDictionary.Add(ScriptDef.sHOUR, ScriptDef.nHOUR);
            ScriptDictionary.Add(ScriptDef.sMIN, ScriptDef.nMIN);
            ScriptDictionary.Add(ScriptDef.sSC_ISADMIN, ScriptDef.nSC_ISADMIN);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKMARRY, ScriptDef.nSC_CHECKMARRY);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKPOSEMARRY, ScriptDef.nSC_CHECKPOSEMARRY);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKPOSELEVEL, ScriptDef.nSC_CHECKPOSELEVEL);
            ScriptDictionary.Add(ScriptDef.sSC_HAVEMASTER, ScriptDef.nSC_HAVEMASTER);
            ScriptDictionary.Add(ScriptDef.sSC_CHECKSLAVECOUNT, ScriptDef.nSC_CHECKSLAVECOUNT);
            ScriptDictionary.Add(ScriptDef.sCHECKIPLIST, ScriptDef.nCHECKIPLIST);
        }
    }
}